import java.util.Arrays;

public class Solution01 {
    public void rotate(int[] nums, int k) {
        int currentindex = nums.length - k;
        int[] array = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {

            if(currentindex == nums.length){
                currentindex = 0;
            }
            int current = nums[currentindex];
            array[i] = current;
            currentindex++;
        }
        System.out.print("[");
        for (int i = 0; i < array.length; i++) {
            if(i == array.length - 1){
                System.out.print(array[i]);
                continue;
            }
            System.out.print(array[i] + ",");
        }
        System.out.println("]");
    }

    public static void main(String[] args) {
        Solution01 solution01 = new Solution01();
        solution01.rotate(new int[]{1,2,3,4,5,6,7},3);
    }
}
